//
//  PhotViewController.m
//  Photograph
//
//  Created by dllo on 16/6/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PhotViewController.h"
#import "Phoview.h"
@interface PhotViewController ()
@property (nonatomic,retain)Phoview *phoview;
@end

@implementation PhotViewController








- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
    [self createScrollView];

}

-(void)createScrollView{
    // 创建一个RainScrollView的对象,添加到父视图上,背景颜色为红
    self.phoview = [[Phoview alloc]initWithFrame:CGRectMake(0, 0, 300, 500)];
   self.phoview.center = self.view.center;
    self.phoview.backgroundColor  =[UIColor redColor];
    [self.view addSubview:self.phoview];
    
    [self.phoview release];
    
    //    添加图片
    UIImage *image = [UIImage imageNamed:@"525.png"];
    UIImage *image2 = [UIImage imageNamed:@"22.jpg"];
    UIImage *image3 = [UIImage imageNamed:@"333.png"];
    UIImage *image4 = [UIImage imageNamed:@"444.jpg"];
    UIImage *image5 = [UIImage imageNamed:@"555.jpg"];
    UIImage *image6 = [UIImage imageNamed:@"11.jpg"];
    NSArray *array = @[image,image2,image3,image4,image5,image6];
    [self.phoview addPictures:array];
    
}
-(void)viewWillAppear:(BOOL)animated{
   
    self.phoview.contentOffset = CGPointMake(self.view.frame.size.width*(self.photoTag-1), 0);
    
    
    
}

@end
